let reg1:RegExp = new RegExp('zpd');       //let reg1:RegEXP = /zpd/
let reg2:RegExp = new RegExp('zpd','gi') //g全局搜索 i忽略大小写   let reg2:RegEXP = /zpd/gi
let test:string = 'my name is zpd'

console.log(reg1)

let result:boolean = reg1.test(test)
console.log(result) //true

console.log(reg2.exec(test))
